<?php
/**
 #利用shell脚本对大文件进行分割
 #!/bin/bash  
   
  lines=`wc   -l   xxx.log|   awk   '{print   $1}'`  
  i=1  
  file_suffix=1  
  while   [   $i   -lt   $lines   ]  
  do  
                  next=`expr   $i   +   999`  
                  sed   -n   "${i},   ${next}p"   xxx.log >   file_$file_suffix.log    
                  n1=`expr   $n2   +   1`  
                  file_suffix=`expr   $file_suffix   +   1`  
  done
  
  
  
  split -l 1000 access.log split
  
  
  

